package org.eclipselabs.egf.portfolio.task.scala.test.date

import org.eclipse.core.runtime.IProgressMonitor
import org.eclipse.egf.core.EGFCorePlugin
import org.eclipse.egf.core.producer.InvocationException
import org.eclipse.egf.ftask.producer.context.ITaskProductionContext
import org.eclipse.egf.ftask.producer.invocation.ITaskProduction
import java.util.Date
import java.lang.Long

class ChangeDate extends ITaskProduction{
	
	def preExecute(taskProductionContext:ITaskProductionContext , monitor:IProgressMonitor ) ={
	}
	
	def doExecute(taskProductionContext:ITaskProductionContext , monitor:IProgressMonitor )={
		var inDate = taskProductionContext.getInputValue("inDate", classOf[Date])
		var inChange = taskProductionContext.getInputValue("inChange", classOf[Long])
		inDate.setTime(inDate.getTime() + inChange)
		taskProductionContext.setOutputValue("inDate", inDate)
	}
	
	def postExecute(taskProductionContext:ITaskProductionContext , monitor:IProgressMonitor )={
	}
}